package com.lihao.jetpackcore.base

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import com.lihao.jetpackcore.state.SingleLiveEvent

/**
 * Created by lihao on 2020/5/13.
 * Describe: ViewModel的基类
 */
open class BaseViewModel(app: Application) : AndroidViewModel(app) {

    val loadingChange: UiLoadingChange by lazy { UiLoadingChange() }

    inner class UiLoadingChange {
        // 显示加载框
        val showDialog by lazy { SingleLiveEvent<String>() }
        // 隐藏
        val dismissDialog by lazy { SingleLiveEvent<Void>() }
    }
}